package com.key.win.base.util;

public class SingleSoldierConstantUtils {

    public static final String REDIS_ROOT_KEY_PREFIX = "single_soldier_wireless:";
    public static final String TOKEN = "token";
    public static final String REFRESH_TOKEN = "refresh:" + TOKEN;
    public static final String REDIS_TOKEN_KEY_PREFIX = REDIS_ROOT_KEY_PREFIX + TOKEN + ":";
    public static final String REDIS_REFRESH_TOKEN_KEY_PREFIX = REDIS_ROOT_KEY_PREFIX + REFRESH_TOKEN + ":";
    public static final String TOKEN_BEARER_KEY = "token_type";
    public static final String TOKEN_BEARER_VAUE = "bearer";
    public static final String TOKEN_EXPIRES_IN_KEY = "expires_in";
    public static final int REFRESH_TOKEN_EXPIRES_IN_VALUE = 3600 * 24 * 7;
    public static final int TOKEN_EXPIRES_IN_VALUE = 3600 * 24 * 1;
    public static final int WEB_SOCKET_DISCONNECT_TOKEN_WAIT_TIME = 60;
    public static final String REQUEST_HEADER_AUTHORIZATION = "Authorization";
    public static final String REQUEST_TOKEN_KEY = "access_token";
    public static final String REFRESH_TOKEN_KEY = "refresh_token";
    public static final String SYSTEM_ANONYMOUS_USER = "anonymous";
    public static final String ORGAN_TREE_PARENT_ID = "-1";
    public static final String MENU_TREE_PARENT_ID = "-1";
    public static final String RESET_PASSWORD = "123456";
    public static final String RESULT_SUCCESS_DEFAULT_MESSAGE = "OK";
    public static final String QUERY_DEFAULT_ORDER_NAME = "createDate";
    public static final String SQL_SEPARATOR = " ";
    public static final String ORDER_BY = SQL_SEPARATOR + "ORDER BY" + SQL_SEPARATOR;
    public static final String SYMBOL_COMMA = ",";
    public static final String SQL_COMMA_SEPARATOR = SQL_SEPARATOR + SYMBOL_COMMA + SQL_SEPARATOR;
    public static final String SPRING_WEB_SOCKET_PATH = "spring.web.socket.path";
    public static final String FRIEND_APPLY_TEMPLATE = "%s申请加为好友";
    public static final String GROUP_APPLY_TEMPLATE = "%s申请加%s群组";
    public static final String FRIEND_APPLY_TEMPLATE_RESULT = "%s%s申请加为好友";
    public static final String GROUP_APPLY_TEMPLATEE_RESULT = "%s%s申请加%s群组";
    public static final String REDIS_IM_ROOT_KEY_PREFIX = REDIS_ROOT_KEY_PREFIX + "im:";
    public static final String REDIS_FREND_SESSION_KEY_PREFIX = REDIS_IM_ROOT_KEY_PREFIX + "chat:";
    public static final String REDIS_GROUP_SESSION_KEY_PREFIX = REDIS_IM_ROOT_KEY_PREFIX + "group:";

    public static String getRedisTokenKey(String token) {
        return SingleSoldierConstantUtils.REDIS_TOKEN_KEY_PREFIX + token;
    }

    public static String getRedisRefreshTokenKey(String refreshToken) {
        return SingleSoldierConstantUtils.REDIS_REFRESH_TOKEN_KEY_PREFIX + refreshToken;
    }

    public static String getRedisFriendSessionKey(String token) {
        return SingleSoldierConstantUtils.REDIS_FREND_SESSION_KEY_PREFIX + token;
    }

    public static String getRedisGroupSessionKey(String token) {
        return SingleSoldierConstantUtils.REDIS_GROUP_SESSION_KEY_PREFIX + token;
    }


}
